package com.fypg.module.medical.controller.app.internethospital;

import com.fypg.framework.common.pojo.CommonResult;
import com.fypg.module.medical.controller.app.internethospital.vo.AppInternetHospitalRespVO;
import com.fypg.module.medical.controller.app.internethospital.vo.AppInternetHospitalVO;
import com.fypg.module.medical.service.internethospital.InternetHospitalService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

import static com.fypg.framework.common.pojo.CommonResult.success;

@Tag(name = "用户 APP - 互联网医院")
@RestController
@RequestMapping("/api/v1/home")
@Validated
public class AppInternetHospitalController {

    @Resource
    private InternetHospitalService internetHospitalService;

    @GetMapping("/GetInternetHospitalList")
    @Operation(summary = "获取互联网医院列表")
    public CommonResult<AppInternetHospitalRespVO<AppInternetHospitalVO>> getInternetHospitalList() {
        AppInternetHospitalRespVO<AppInternetHospitalVO> internetHospitalList = internetHospitalService.getInternetHospitalList();
        return success(internetHospitalList);
    }

}
